package com.itheima.JDBC02;

import com.itheima.utils.JDBCUtils;

import java.sql.Connection;
import java.sql.Statement;

public class JDBCDemo {
    public static void main(String[] args) throws Exception {

        //2. 获取连接
        Connection conn = JDBCUtils.getConnection();
        //3. 获取语句执行对象
        Statement st = conn.createStatement();
        //4. 编写SQL
        String sql = "insert into account values(null,'lucy',1000)";
        //5. 执行SQL
        int i = st.executeUpdate(sql); // SQL影响的行数
        System.out.println(i);

        JDBCUtils.release(null, st, conn);
    }
}
